package com.kkang.ch2.event;

import org.springframework.context.ApplicationEvent;

/**
 * 自定义事件
 *
 * @author yongk_liu
 **/
public class DemoEvent extends ApplicationEvent {

    private String msg;

    /**
     * 创建一个自定义事件
     *
     * @param source the component that published the event (never {@code null})
     */
    public DemoEvent(Object source, String msg) {
        super(source);
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
